home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Client
- BorderStyle = 1 'Fixed Single
- Caption = "Net Hood Instant Message"
- ClientHeight = 4905
- ClientLeft = 1530
- ClientTop = 1515
- ClientWidth = 4095
- Height = 5340
- Icon = "Client.frx":0000
- Left = 1470
- LinkTopic = "Client"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4905
- ScaleWidth = 4095
- Top = 1140
- Width = 4215
- WindowState = 1 'Minimized
- Begin VB.Timer Timer1
- Interval = 3000
- Left = 1305
- Top = 4485
- End
- Begin VB.CommandButton Command2
- Caption = "End"
- Height = 345
- Left = 0
- TabIndex = 3
- Top = 4560
- Width = 1035
- End
- Begin VB.CommandButton Command1
- Caption = "Send"
- Height = 345
- Left = 2925
- TabIndex = 2
- Top = 4560
- Width = 1170
- End
- Begin VB.TextBox txtSent
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 2310
- Left = -15
- MultiLine = -1 'True
- TabIndex = 1
- Top = 0
- Width = 4110
- End
- Begin VB.TextBox txtMessage
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 2145
- Left = -15
- MultiLine = -1 'True
- TabIndex = 0
- Top = 2340
- Width = 4110
- End
- Attribute VB_Name = "Client"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- 'Put the path to your network server here!!!
- 'Something like \\Computer Name\C drive\
- Const fServe = NetServerPath & "Sent.txt"
- Const fClient = NetSeverPath & "Message.txt"
- Private Sub Send()
- Dim fnum As Integer
- fnum = FreeFile
- Open fClient For Output As fnum
- Print #fnum, txtMessage
- Close fnum
- End Sub
- Private Sub LoadData()
- Dim fnum As Integer
- fnum = FreeFile
- Open fServe For Input As fnum
- txtSent = Input(LOF(fnum), fnum)
- Close fnum
- End Sub
- Private Sub Command1_Click()
- txtMessage = ""
- End Sub
- Private Sub Command2_Click()
- If FileExists(fServe) Then Kill fServe
- If FileExists(fClient) Then Kill fClient
- End Sub
- Private Sub Form_Load()
- TopZ Me
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Cancel = True
- Window Me, 2
- If FileExists(fServe) Then Kill fServe
- If FileExists(fClient) Then Kill fClient
- txtSent = ""
- End Sub
- Private Sub Timer1_Timer()
- If FileExists(fServe) Then
- LoadData
- Window Me, 1
- TopZ Me
- End If
- End Sub
-